package day11.HashSet.Map;

import java.util.HashMap;
import java.util.Map;

public class MapDemo1 {

    public static void main(String[] args) {
        Map<String , String> map = new HashMap<>();
        String s1 = map.put("张三", "北京");
        String s2 = map.put("李四", "北京");
        String s3 = map.put("王五", "北京");
        String s4 = map.put("王五", "上海");
        map.remove("王五");

        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s3);
        System.out.println(s4);
        System.out.println(map);
        System.out.println(map.containsKey("张三"));
        System.out.println(map.containsValue("上海"));
        map.clear();
        System.out.println(map.isEmpty());
        System.out.println(map.size());

    }
}
